<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>get file input full path</title>
    <script type="text/javascript" language='javascript'>
    function getFullPath(obj) {
        var newPreview = document.getElementById("img");
        if (obj) {
            //ie
            if (window.navigator.userAgent.indexOf("MSIE") >= 1) {
                obj.select();
                newPreview.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);";
                newPreview.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = document.selection.createRange().text;

                return;
            }
            //firefox
            else if (window.navigator.userAgent.indexOf("Firefox") >= 1) {
                if (obj.files) {
                    newPreview.src = window.URL.createObjectURL(obj.files.item(0));

                    return;
                }
                newPreview.src = obj.value;

                return;
            }
            newPreview.src = obj.value;

            return;
        }
    }
    </script>
</head>

<body>
    <input type="file" onchange="getFullPath(this);" />
    <img id="img" alt="" style="width:200px; height:200px;" src="你自己的透明图片" />
</body>

</html>